﻿using System;
using DynConDevCorp.OpenArch.SmartData.Interfaces;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTest.DynConDevCorp.OpenArch.SmartData.UnitTests
{
    [TestClass()]
    public class PartialBoolean_UnitTests
    {


        private TestContext testContextInstance;

        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        [TestMethod()]
        public void True_UnitTest()
        {
            PartialBoolean actual = PartialBoolean.True;
            Assert.IsTrue(actual.ToBoolean());
        }

        [TestMethod()]
        public void State_UnitTest()
        {
            PartialBoolean target = new PartialBoolean();
            PartialBooleanState actual = target.State;
            Assert.AreEqual(PartialBooleanState.Undefined, actual);
        }

        [TestMethod()]
        public void Mixed_UnitTest()
        {
            PartialBoolean actual = PartialBoolean.Mixed;
            Assert.AreEqual(PartialBooleanState.Mixed, actual.State);
        }

        [TestMethod()]
        public void IsValidBoolean_UnitTest()
        {
            PartialBoolean target = new PartialBoolean(PartialBooleanState.Mixed);
            Assert.IsFalse(target.IsValidBoolean);
            target = new PartialBoolean(PartialBooleanState.Undefined);
            Assert.IsFalse(target.IsValidBoolean);
            target = new PartialBoolean(PartialBooleanState.True);
            Assert.IsTrue(target.IsValidBoolean);
            target = new PartialBoolean(PartialBooleanState.False);
            Assert.IsTrue(target.IsValidBoolean);
        }

        [TestMethod()]
        public void IsTrue_UnitTest()
        {
            PartialBoolean target = new PartialBoolean();
            bool actual = target.IsTrue;
            Assert.IsFalse(actual);
        }

        [TestMethod()]
        public void IsFalse_UnitTest()
        {
            PartialBoolean target = new PartialBoolean();
            bool actual = target.IsFalse;
            Assert.IsFalse(actual);
        }

        [TestMethod()]
        public void False_UnitTest()
        {
            PartialBoolean actual = PartialBoolean.False;
            Assert.IsTrue(actual.IsFalse);
        }

        [TestMethod()]
        [ExpectedException(typeof(ArgumentException))]
        public void ToBoolean_UnitTest()
        {
            PartialBoolean target = new PartialBoolean(); 
            const bool expected = false;
            bool actual = target.ToBoolean();
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void op_Inequality_UnitTest()
        {
            PartialBoolean value1 = new PartialBoolean(); 
            PartialBoolean value2 = new PartialBoolean(); 
            const bool expected = false;
            bool actual = (value1 != value2);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void op_Implicit_UnitTest()
        {
            const bool state = false;
            PartialBoolean expected = new PartialBoolean(PartialBooleanState.False);
            PartialBoolean actual = state;
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void op_Explicit_UnitTest()
        {
            PartialBoolean value = new PartialBoolean(PartialBooleanState.False); 
            const bool expected = false;
            bool actual = ((bool)(value));
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void op_Equality_UnitTest()
        {
            PartialBoolean value1 = new PartialBoolean(); 
            PartialBoolean value2 = new PartialBoolean(); 
            const bool expected = true;
            bool actual = (value1 == value2);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void GetHashCode_UnitTest()
        {
            PartialBoolean target = new PartialBoolean(); 
            const int expected = 0;
            int actual = target.GetHashCode();
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void Equals_UnitTest1()
        {
            PartialBoolean target = new PartialBoolean(); 
            PartialBoolean obj = new PartialBoolean(); 
            const bool expected = true;
            bool actual = target.Equals(obj);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void Equals_UnitTest()
        {
            PartialBoolean target = new PartialBoolean(); 
            const object obj = null; 
            const bool expected = false;
            bool actual = target.Equals(obj);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void PartialBooleanConstructor_UnitTest1()
        {
            const PartialBooleanState state = new PartialBooleanState(); 
            PartialBoolean target = new PartialBoolean(state);
            Assert.IsNotNull(target);
        }

        [TestMethod()]
        public void PartialBooleanConstructor_UnitTest()
        {
            const bool state = false; 
            PartialBoolean target = new PartialBoolean(state);
            Assert.IsNotNull(target);
        }
    }
}